#ifndef SOURCELIST_H
#define SOURCELIST_H

#include "itemmodel.h"
#include <QList>

class SourceList
{
    static SourceList *instance;
    SourceList();
    QList<ItemModel*> items;
public:
    static SourceList *getInstance();
    ItemModel* getItem(int index);
    void addItem(ItemModel* item);
    void insertItem(ItemModel*item, int index);
    void removeItem(ItemModel* item);
    void removeItem(int index);
    PlaylistItem* getItem(QString path);
    QStringList getAllPaths();
    QList<Track> getAllTracks();
    int getItemIndex(PlaylistItem* item);
    Track getTrack(int index);
    void clear();
    int size();
};

#endif // SOURCELIST_H
